﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="News_news" Codebehind="news.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <asp:DataList ID="listNews" runat="server" DataSourceID="dataNews" 
        DataKeyField="ID" RepeatLayout="Flow">
        <ItemTemplate>
            <asp:HyperLink ID="urlTitle" runat="server" Font-Bold="True" 
                ForeColor="Black" NavigateUrl='<%# "~/News/detail.aspx?NewsId=" + Eval("ID") %>' 
                Text='<%# Eval("TieuDe") %>'></asp:HyperLink>
            <br />
            <asp:Label ID="lbUser" runat="server" Text='<%# "<i>bởi</i> " + Eval("NguoiDang") %>' 
                Font-Size="X-Small"></asp:Label>
            <br />
            <asp:Label ID="lbPublishDay" runat="server" Font-Size="X-Small" 
                Text='<%# Eval("NgayDang") %>'></asp:Label>
            <br />
            <br />
            <asp:Label ID="lbContent" runat="server" Text='<%# Eval("NoiDung") %>'></asp:Label>
            <hr />
        </ItemTemplate>
    </asp:DataList>
    
    <asp:ObjectDataSource ID="dataNews" runat="server" SelectMethod="GetNews" 
        TypeName="E2_WEBSITE.Code.Admin.NewsController"></asp:ObjectDataSource>
</asp:Content>

